import UILayer = eui.UILayer;
/**
 * Create by richliu1023
 * @date 16/5/19
 * @email richliu1023@gmail.com
 * @github https://github.com/RichLiu1023
 * @description a simple explanation
 */
class Main extends eui.UILayer {

	protected createChildren():void {
		super.createChildren();
		this.initLoading();
	}

	private initLoading():void {
		new MainLoader( this );
	}

	public startSetup():void {
		this.setupConfig();
		this.setupEngine();
	}

	private setupConfig():void {
		rm.Log.DEBUG = true;
		console.log( 'rm version : ', rm.version );
	}

	private setupEngine():void {
		UIController.setup( this );
		NoticeController.setup();
		//SocketController.setup();
		//ReceiverController.setup();
		//BetManager.setup();
		//PlayerManager.setup();
	}

	public startCreateScene():void {
		WorldControl.setup();
		SceneController.initScene();
		this.setupMainPanel();
	}

	public setupMainPanel():void {
		//rm.AppManager.showApp( AppConstant.LOGIN_PANEL );
		//SocketController.connectLogin();
	}
}
